# Example 2 page 39 from "Basic Mechanics of Laminated Composite Plates" # A.T. Nettles # NASA Reference Publication 1351
# Note: the results presented in the above publication for matrix B components are incorrect.


In [1]:
import pyPLY

# define the material


In [2]:
AS4_3501_6 = pyPLY.CompositeMaterial()
AS4_3501_6.define("AS4_3501_6", "imperial", E11=20010000.0, E22=1301000.0, G12=1001000.0, niu12=0.3, thk=0.005)

# define the ply's layers


In [3]:
layer1 = pyPLY.Lamina()
layer2 = pyPLY.Lamina()

# define the properties of each layer.
# The parameters are "layer's name", "material number", "ply angle"


In [4]:
layer1.define("Layer_1", 1, 0)
layer2.define("Layer_2", 1, 45)

# update the properties. Required after each change of properties.


In [5]:
layer1.update()
layer2.update()

# add each defined layer to the laminate stack


In [6]:
laminate1 = pyPLY.Laminate()
laminate1.add_Lamina(layer1)
laminate1.add_Lamina(layer2)

# update the properties. Required after each change of properties.


In [7]:
laminate1.update()

from numpy import set_printoptions
set_printoptions(suppress=True)
# print the results
print "A = ", laminate1.A
print "B = ", laminate1.B
print "D = ", laminate1.D
print "Ex = ", '{0:10.0f}'.format(laminate1.Ex)


A =  [[ 133420.93537597   24735.02596905   23523.9018575 ]
 [  24735.02596905   39325.32794599   23523.9018575 ]
 [  23523.9018575    23523.9018575    30819.05284596]]
B =  [[-169.6421414    52.02263211   58.80975464]
 [  52.02263211   65.59687717   58.80975464]
 [  58.80975464   58.80975464   52.02263211]]
D =  [[ 1.11184113  0.20612522  0.19603252]
 [ 0.20612522  0.32771107  0.19603252]
 [ 0.19603252  0.19603252  0.25682544]]
Ex =     5867148

In [8]:
from pyPLYTools import LXMatrix
from IPython.display import Latex

Latex("$B = " + LXMatrix(laminate1.B, '.3e', ipython=True) + "$")


Out[8]:
$B = \left[\begin{array}{ccc} -1.696e+02 & 5.202e+01 & 5.881e+01\\ 5.202e+01 & 6.560e+01 & 5.881e+01\\ 5.881e+01 & 5.881e+01 & 5.202e+01 \end{array}\right]$

In [9]:
Latex("$D = " + LXMatrix(laminate1.D, '.3e', ipython=True) + "$")


Out[9]:
$D = \left[\begin{array}{ccc} 1.112e+00 & 2.061e-01 & 1.960e-01\\ 2.061e-01 & 3.277e-01 & 1.960e-01\\ 1.960e-01 & 1.960e-01 & 2.568e-01 \end{array}\right]$

In [10]:
Latex("$E_x = " + '{0:10.0f}'.format(laminate1.Ex) + "$")


Out[10]:
$E_x = 5867148$